package com.xxx.controller;

import com.xxx.po.User;
import com.xxx.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/findUser")
    public String findUser(String username, String password, Model model){
        // 通过用户名和密码查找用户信息
        User user = userService.findUser(username, password);
        model.addAttribute(user);
        return "main";
    }

}
